./" ************************************************* ***************************
./" gwm.1: gwm(1) manpage.
./" Copyright (C) 2020-2025 gsm <406643764@qq.com>
./" This program is free software: you may redistribute and modify it under the
./" GNU General Public License, version 3 or later, as published by the Free
./" Software Foundation.
./" Whilst this program is published for purpose of use, no warranty of any
./" kind is assumed, nor is the implied warranty of merchantability or fitness
./" for a particular purpose contained. See GNU > General Public License for
./" details.
./" You should have received a copy of the GNU General Public License with this
./" program. Otherwise, see <http://www.gnu.org/licenses/>.
./" ************************************************* ***************************/

.TH gwm 1 May 2025 "gwm 2.13.4" gwm
.
.SH NAME
.B
gwm \- gwm (gsm's window manager), is an X11-based dynamic window manager written in C language.
.
.SH SYNOPSIS 
.B gwm
.
.SH DESCRIPTION
.PP
gwm (gsm's window manager), is an X11-based dynamic window manager written in C language.
.PP
The child windows of the X Window System are always located above the parent window in screen space, and the window opened later is always located above the brother window opened first in screen space; the newly opened window is always located on top of the screen space. This window order is called window stacking order. The stacking order can be adjusted.
.PP
gwm virtualizes the physical screen into multiple logical screens, the so-called virtual desktops. Logically, for each virtual desktop, the screen space above root window is divided into the following seven layers from bottom to top: desktop layer, below layer, tile layer, stack layer, above layer, dock layer, full screen layer; The screen is divided into taskbar and workarea from the plane. This is just a logical layering, the purpose is to achieve visual layering. In fact, gwm achieves the layering effect by adjusting the stacking order of the windows, not by resetting the parent window for layering. A window on the upper layer will always block the window on the lower layer. gwm supports two window layout modes: tiling, stacking, which can be dynamically switched at runtime. The taskbar is consists of buttons on the left, a icon bar in the middle, and a status bar on the right. Buttons are used to achieve specific functions, and the text of each button from left to right is: 1, 2, 3, ▣, ▥, ■, ^. The icon bar is used to display the iconified window, click the iconified window to deiconify window. The status bar shows the name of the root window.
.PP
The windows mentioned below, unless otherwise specified, refer to the windows managed by this window manager. The current window mentioned below, unless otherwise specified, refer to the window under the current virtual desktop that is located at the top of the layer to which the window belongs and has the keyboard input focus. The following instructions or commands, unless otherwise specified, are limited to the current virtual desktop.
.PP
Tiling mode is a layout mode in which all normal windows are arranged proportionally in the workarea of the tile layer. It divides the screen space into main area, secondary area, fixed area from left to right. If the fixed area is not occupied by windows, the area will be merged into the main area and the secondary area. If the secondary area is not occupied by a window, the area is merged into the main area. Each of the three areas evenly allocates space to the corresponding window. The windows of the main area and the secondary area are complementary to each other, that is, if the number of windows in the main area is more than the number of windows that can be accommodated in the main area due to an operation, the windows at the bottom of the main area will be moved to the top of the secondary area; If the number of windows in the main area is less than the number of windows that can be accommodated in the main area and the number of windows in the secondary area is greater than zero, the window at the top of the secondary area will be moved to the bottom of the main area. Hereinafter, this rule is referred to as main and secondary area complementarity.
.PP
Stacking mode is a layout mode in which windows can be stacked, and all windows are arranged in the workarea according to their requested positions.
.PP
gwm resets the parent window for all windows, the parent window also includes the border, the title bar, both of which are collectively called the window frame. The original window range before reparenting is called the non-frame area. Among them, the title bar sets the logo button, title area and other buttons sequentially from left to right. The logo button is used to provide drop-down menu. The title area is used to display the title of the window and provide the function of moving the window. Other buttons are used to implement specific functions, and the number of buttons varies with the basic window layout mode. In tiling mode, the text of each button from left to right is: ◁, ▼, ▷, △, —, ◲, 🗙. In stacking mode, ◁, ▼, ▷, △ buttons are not displayed.
.
.SH OPTIONS
none.
.
.SH USAGE
.
.SS General Description
.
.TP
You can view the mapping of modifier keys through xmodmap(1). Usually, Mod1 corresponds to Alt, and Mod4 corresponds to Super.
.TP
When using keyboard commands, pointer commands, the caps lock and num lock keys are ignored.
.TP
When moving or resizing a window in tiling mode, the window switches to the top of the stack layer, while the remaining windows remain in the original layout mode. Windows can only be moved or resized in stacking, or tiling modes. Only in the tiling mode can perform area-related operations. When a window is moved or resized, a hint window for window coordinates and dimensions will be displayed. The size is in the size step value preferred by the program, which may be in pixels, character width, or other.
.TP
Window group refer to all open windows of the same program, while a window subgroup refer to a program's main window and all its descendant transient windows. If the window subgroup contains modal windows, only the top-level modal window can be operated. When performing operations of iconify, deiconify, and desktop switching on a window, the same operation will be performed on other windows in the same subgroup; when performing other operations, it will only be applied to this window.
.TP
When there is an urgency or attention request come from a client window which not on the current virtual desktop, the taskbar desktop button corresponding to the virtual desktop where the client window is on will change color. Usually red represents an urgency request and yellow represents a attention request. Specific colors vary by color theme.
.TP
Unless otherwise specified, the following commands operate on the current desktop.
.TP
The status bar will show the result of "xsetroot \-name". If not set, "gwm" is displayed.
.TP
Immediately after gwm starts, it tries to execute ~/.config/gwm/autostart.sh.
.
.SS Key Commands
.
.TP
.B F1
Try opening the gwm manpage with one of the following terminal emulators in order: lxterminal, xfce4-terminal, xterm. Hereinafter referred to as Open the gwm manpage.
.
.TP
.B Brightness down key
Reduce screen brightness.
.
.TP
.B Brightness up key
Increase screen brightness.
.
.TP
.B Mod4+Mod1+f
Open your default file browser.
.
.TP
.B Mod4+Mod1+g
Open the the default game, i.e. Battle for Wesnoth.
.
.TP
.B Mod4+Mod1+q
Open QQ.
.
.TP
.B Mod4+Mod1+t
Try to open the following emulated terminals in order until one of them is opened or the trial is exhausted: lxterminal, xfce4-terminal, gnome-terminal, konsole5, xterm. Hereinafter referred to as open emulated terminal.
.
.TP
.B Mod4+Mod1+w
Open your default web browser.
.
.TP
.B Mod4+Mod1+F1
Run the following command: mplayer -shuffle ~/music/*.
.
.TP
B. Mod4+Mod1+F2
Switch the start and stop status of the above mplayer commands.
.
.TP
.V Mod4+Mod1+F3
Terminate the above mplayer command.
.
.TP
.B Mod4+Control+F1
Use amixer to reduce the volume.
.
.TP
B Mod4+control+F2
Use amixer to increase the volume.
.
.TP
.B Mod4+Control+F3
Use amixer to set the volume to maximum.
.
.TP
.B Mod4+Control+F4
Use amixer to toggle between current volume and mute.
.
.TP
.B Mod4+Control+l
Log out of the gwm session, ie: pkill -9 startgwm.
.
.TP
.B Mod4+Control+p
shutdown.
.
.TP
.B Mod4+Control+r
Restart the operating system.
.
.TP
.B Mod4+Delete
Quit gwm.
.
.TP
.B Mod4+k
Move the current window up.
.
.TP
.B Mod4+j
Move the current window down.
.
.TP
.B Mod4+h
Move the current window to the left.
.
.TP
.B Mod4+l
Move the current window to the right.
.
.TP
.B Mod4+Up
Decrease current window's height.
.
.TP
.B Mod4+Down
Increase current window's height.
.
.TP
.B Mod4+Left
Decrease current window's width.
.
.TP
.B Mod4+Right
Increase current window's width.
.
.TP
.B Mod4+F1
Move the current window to the top of the main area.
.
.TP
.B Mod4+F2
Move the current window to the top of the secondary area.
.
.TP
.B Mod4+F3
Move the current window to the top of the fixed area.
.
.TP
.B Mod4+F4
Move the current window to the top of the stack layer.
.
.TP
.B Mod4+f
Move the current window to the top of the screen layer.
.
.TP
.B Mod4+a
Move the current window to the top of the above layer.
.
.TP
.B Mod4+b
Move the current window to the top of the below layer.
.
.TP
.B Mod4+Return
If the current window is a iconified window, the window will be deiconified.
.
.TP
.B Mod4+Tab
Switches to the next window.
.
.TP
.B Mod4+Shift+Tab
Switch to the previous window.
.
.TP
.B Mod4+c
Close the current window.
.
.TP
.B Mod4+s
Switch to stacking mode.
.
.TP
.B Mod4+t
Switch to tiling mode.
.
.TP
.B Mod4+i
Increase the number of windows that can fit in the main area.
.
.TP
.B Mod4+Shift+i
Reduce the number of windows that can fit in the main area.
.
.TP
.B Mod4+m
If there are secondary area, increase the main area rate and decrease the secondary area rate accordingly.
.
.TP
.B Mod4+Shift+m
If there are  secondary area, decrease the main area rate and increase the secondary area rate accordingly.
.
.TP
.B Mod4+x
If there is a fixed area, increase the fixed area rate and decrease the main area rate accordingly.
.
.TP
.B Mod4+Shift+x
If there is a fixed area, decrease the fixed area rate and increase the main area rate accordingly.
.
.TP
.B Mod4+PageDown
Switches to the next virtual desktop. Can be cycled.
.
.TP
.B Mod4+PageUp
Switch to the previous virtual desktop. Can be cycled.
.
.TP
.B Print
Take full screen screenshots and save to file.
.
.TP
.B Mod4+Print
Take a screenshot of the current window and save it to file.
.
.TP
.B Mod4+r
Open run entry.
.
.TP
.B Mod4+Delete
Quit gwm. if you start gwm through startgwm, gwm will be reopened，which equal to refresh gwm。
.
.TP
.B Mod4+Shift+number N key
Switch to the Nth virtual desktop.
.
.TP
.B Mod4+number N key
Move the current window to the Nth virtual desktop.
.
.TP
.B Mod4+Mod1+number N key
Move all windows to the Nth virtual desktop.
.
.TP
.B Control+number N key
Move the current window to the Nth virtual desktop, and switch to the Nth virtual desktop.
.
.TP
.B Control+Mod1+number N key
Move all windows to the Nth virtual desktop, and switch to the Nth virtual desktop.
.
.TP
.B Mod1+number N key
Attach the current window to the Nth virtual desktop.
.
.TP
.B Mod1+Shift+number N key
Attach all windows to the Nth virtual desktop.
.
.TP
.B Shift+Control+0
Attach the current window to all virtual desktops.
.
.SS Pointer Command
.
.TP
Pointer hovering means that the pointer does not move for a set period of time. Pointer button 1 is usually the left mouse button, pointer button 2 is usually the middle mouse button, and pointer button 3 is usually the right mouse button. Clicking on the window with the pointer will switch the window to the current window. Clicking in a window other than the Action Center will close the Action Center. Pointer commands vary by pointer button pressed, keypressed, clicked, window hovered over. Unless otherwise specified below, when the pointer hovers over the component, a tooltip window will pop up.
.
.TP
Unless otherwise specified below, moving the window refers to moving the window from the place where the window is clicked to the place where the corresponding pointer button is released. If this operation is performed in the tiling mode, the window will also move to stack layer; swapping the window refers to in the tiling mode, the clicked window is swapped with the window where the cursor is when the corresponding pointer button is released; changing place refers to change the clicked window to the place indicated by the clicked place button, or change the clicked window to the place where the cursor was when the corresponding pointer button was released and is placed in front of the window where the cursor was released, with the following exceptions: When released at the left edge of the screen, if a window exists in the secondary area, the window change to the top of the secondary area, Otherwise, change to the top of the main area; when the right edge of the screen is released, change to the top of the fixed area; when the root window is released, change to the top of the main area.
.
.TP
Some "pointer button1 click" commands, which can be understood directly according to the name of the component it operates, or have explained the meaning of the command clearly by the tooltip, won't be described here.
.
.TP
.B Operate the application window (unless otherwise specified, the corresponding pointer command is: pointer button 1 - click)
    Window title area:
        Pointer button 1 - click      Focus the window,
        Pointer button 1 - move       Move the window,
        Pointer button 2 - move       Change place,
        Pointer button 3 - move       Swap two windows;
    Window borders:
        Pointer button 1 - click      Focus window,
        Pointer button 1 - move       Adjusts the window size;
    Window non-frame area:
        Pointer button 1            - click     Focus the window,
        Mod4+pointer button 1       - move      Move the window,
        Mod4+Shift+pointer button 1 - move      Resize the window,
        Mod4+pointer button 2       - move      Change place,
        Mod4+pointer button 3       - move      Swap window.
.
.TP
.B Operate the root window (unless otherwise specified, the corresponding pointer command is: pointer button 1 - move)
    Between the main area and the secondary area: adjust the rate of the main area and the secondary area;
    Between the main and fixed areas: adjust the ratio of the main and fixed areas.
.
.TP
.B Operate taskbar (unless otherwise specified, the corresponding pointer command is: pointer button 1 - click)
    Taskbar virtual desktop buttons:
        Pointer button 1              - click  Change to this virtual desktop,
        Control+pointer button 1      - click  Move the current window to this virtual desktop, and change to this virtual desktop,
        Control+Mod1+pointer button 1 - click  Move all windows to this virtual desktop, and Change to this virtual desktop,
        Pointer button 2              - click  The current window is attached to this virtual desktop,
        Mod1+pointer button 2         - click  All windows are attached to this virtual desktop,
        Shift+pointer button 2        - click  The current window is attached to all virtual desktops,
        Pointer button 3              - click  The current window to move to that virtual desktop,
        Mod1+pointer button 3         - click  Move all windows to this virtual desktop;
    icon in the taskbar:
        Pointer button 1      - click   Deiconify the window,
        Pointer button 3      - move    Swap two windows,
        Pointer button 2      - move    Change place,
        Mod4+pointer button 2 - click   Close the icon and the corresponding window.
.
.TP
.B Operate action center(unless otherwise specified, the corresponding pointer command is: pointer button 1 - click)
    Run button: Open the command entry and have grab keyboard. After typing part or all of a command, press Enter to run the first matching command and exit. Press the Esc key or use the pointer to click outside the entry to close the command entry. Support simple editing functions, you can use the Backspace key to delete a character before the cursor, use the Del key to delete a character after the cursor, use the left key to move the cursor to the position of the previous character, and use the right key to move the cursor to the position of next character, use the Home key to move the cursor before the first character, use End to move the cursor behind the last character, use Control+u to clear all characters before the cursor, use Control+v to paste the content at the cursor position, use Tab key completes commands.
.
.SH Property
.
.TP
Property is a mechanism for communicating with gwm. Property can be modified using xprop(1). In addition to X standard property, ICCCM property, and EWMH property, gwm also supports the following property:
.
.TP
.B GWM_MAIN_COLOR_NAME
The main color name of the gwm interface. String format. Supports English color name and hexadecimal string(eg: #abcdef). Modifying this property changes the color theme. eg: xprop -root -f GWM_MAIN_COLOR_NAME 8s -set GWM_MAIN_COLOR_NAME "black".
.
.SH Configuration
.
.TP
Currently the configuration can only be modified by modifying the source code. Specifically, modify config.c, bind_cfg.h and rule_cfg.h, which already contains detailed configuration notes.
.
.SH BUGS REPORT
.
Because the ICCCM and EWMH protocols have not been fully implemented yet, the program windows using these protocols may not run correctly. If you find other bugs, please report to <406643764@qq.com>.
.
.SH AUTHOR
.
This program is developed by gsm<406643764@qq.com>.
.br
Official website: https://sourceforge.net/projects/gsmwm/.
.
.br
Official QQ group: The group account is 920793458, and the group name is gwm.
.
.SH COPYRIGHT
.
Copyright \(co 2020-2025 gsm <406643764@qq.com>.
.br
This program is free software: you may redistribute and modify it under the GNU General Public License, version 3 or later, as published by the Free Software Foundation.
